google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(function(){ var data = new google.visualization.DataTable(); data.addColumn('string', '日'); data.addColumn('number', '推測'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', '推測'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', 'iOS前月'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', 'iOS当月'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addRows([ ['1日',965,null,null,null,null,null,null,null,null,null,null,null], ['2日',1166,null,null,820,null,null,null,null,null,null,null,null], ['3日',947,null,null,812,null,null,null,null,null,null,null,null], ['4日',892,null,null,869,null,null,null,null,null,null,null,null], ['5日',975,null,null,975,null,null,null,null,null,null,null,null], ['6日',879,null,null,788,null,null,null,null,null,null,null,null], ['7日',841,null,null,802,null,null,null,null,null,null,null,null], ['8日',975,null,null,926,null,null,null,null,null,null,null,null], ['9日',962,null,null,1038,null,null,null,null,null,null,null,null], ['10日',1103,null,null,822,null,null,null,null,null,null,null,null], ['11日',997,null,null,875,null,null,null,null,null,null,null,null], ['12日',1092,null,null,827,null,null,null,null,null,null,null,null], ['13日',null,null,null,995,null,null,null,null,null,null,null,null], ['14日',898,null,null,928,null,null,null,null,null,null,null,null], ['15日',941,null,null,953,null,null,null,null,null,null,null,null], ['16日',870,null,null,989,null,null,null,null,null,null,null,null], ['17日',968,null,null,1035,null,null,null,null,null,null,null,null], ['18日',1039,null,null,987,null,null,null,null,null,null,null,null], ['19日',997,null,null,820,null,null,null,null,null,null,null,null], ['20日',null,null,null,923,null,null,null,null,null,null,null,null], ['21日',1060,null,null,915,null,null,null,null,null,null,null,null], ['22日',1085,null,null,906,null,null,null,null,null,null,null,null], ['23日',null,null,null,855,null,null,null,null,null,null,null,null], ['24日',1006,null,null,963,null,null,null,null,null,null,null,null], ['25日',null,null,null,1076,null,null,null,null,null,null,null,null], ['26日',905,null,null,940,null,null,null,null,null,null,null,null], ['27日',1076,null,null,1012,null,null,null,null,null,null,null,null], ['28日',null,null,null,855,null,null,null,null,null,null,null,null], ['29日',1063,null,null,853,null,null,null,null,null,null,null,null], ['30日',null,null,null,null,null,null,null,null,null,null,null,null], ['31日',null,null,null,null,null,null,null,null,null,null,null,null] ]); var options = { chartArea: {'width':'85%', 'height':'65%', 'left':60 }, 'pointSize': 3, hAxis: { titleTextStyle:{italic:false}, format:'#',ticks: [1,5,10,15,20,25,30] }, vAxis: { title:'2024年3月ランキング', titleTextStyle:{italic:false}, format:'#',viewWindow:{min:0,max:1200},direction:-1 }, legend: {position: 'top' }, tooltip: { trigger: 'both' }, focusTarget: 'category', colors:['skyblue','pink','#2980b9','#e74c3c'] }; var chart = new google.visualization.LineChart(document.getElementById('graphField')); chart.draw(data, options); var lastlogday=29 -1 ; var lastlogcat=4; if(lastlogday>=0){ chart.setSelection([{ row: lastlogday, column: lastlogcat }]); google.visualization.events.addListener(chart, 'click', function() { if(chart.getSelection()[0]){ //chart.setSelection(null) } }); } });